REM Sample Power Basic program that calls OPT-TECH SORT
DECLARE SUB SORTPB(STRING, STRING, STRING, INTEGER, INTEGER)
$LINK "SORTPBI.OBJ"
INFILE$ ="SAMP.DAT"
OUTFILE$="SORTED.DAT"
CTLSTMT$="S(1,10,C,A)"
PRINT "CALLING OPT-TECH SORT..."
CALL SORTPB(INFILE$,OUTFILE$,CTLSTMT$,NUMRECS%,RETCODE%)
PRINT "BACK FROM OPT-TECH SORT"
PRINT "NUMBER OF RECORDS = ",NUMRECS%
PRINT "SORT STATUS       = ",RETCODE%
END

